<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Members extends MY_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$this->load->view('welcome_message');
	}
        
        
        /*
         * 
         * 用户注册
         * 
         */
        
        public function reg() {
            $mobile = $this->input->post("mobile");
            $code = $this->input->post("code");
            $password = $this->input->post("password");
            
            $mobile_status = $this->_chk_mobile($mobile);
            
            if($mobile_status)
            {
//                通过的手机的检测
            }
            else
            {
                
            }
        }
        
        
        /*
         * 用户登录
         * 
         */
        
        
        
        /*
         * 下发验证码
         * 
         */

        public function send_verification_code()
        {
            
                // $this->sendsms();
        }
        
        /*
         * 获取手机是否已经注册
         */
        public function get_mobile_exist() {
            $mobile = $this->input->post("mobile");
            
            $mobile_status = $this->_chk_mobile($mobile);
            
            if($mobile_status)
            {
//                通过的手机的检测
            }
            else
            {
                
            }       
            
            
        }
        

        /*
         * 推送短信
         */
        public function test2() {
            $this->config->load('config_diy',TRUE);
            $configs['appkey']=$this->config->item('appkey','config_diy');
            $configs['secretKey']=$this->config->item('secretKey','config_diy');
            // print_r($configs);
            
            // exit();
            // $configs['appkey']="23332279";
            // $configs['secretKey']="300852f85ff0af53b397ab0c76d4022b";
            
//            加载发送短信的类
            $this->load->library("alidayu",$configs);
            
            
            /*
             * 
             * 发送短信
             * 
             * 编辑好发送的内容内容
             * 
             */
            
            $this->alidayu->sendsms();
        }
        
        
        
        /*
         * 修改手机号
         * 
         */
        
        
        /*
         * 查看消息
         */
        
        
        /*
         * 获取好友列表
         */
        
        /*
         * 检查手机号码唯一性
         * 
         * return True/ False
         * 
         */
        
        public function _chk_mobile($mobile) {
            
        }
        
        


        

        
}
